﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EuroManager.Domain.Simulator.AI;
using EuroManager.Domain.Simulator.AI.States;
using EuroManager.Domain.Simulator.Engine;
using EuroManager.Domain.Simulator.Tactics;
using EuroManager.Domain.Simulator.Tests.Tactics;
using EuroManager.Domain.Simulator.Tests.World;
using EuroManager.Domain.Simulator.World;
using NUnit.Framework;
using Rhino.Mocks;

namespace EuroManager.Domain.Simulator.Tests.AI.States
{
    [TestFixture]
    public class ObserveStateTests
    {
        [Test]
        public void ShouldMoveToTacticalLocation()
        {
            IPlayer player = MockRepository.GenerateMock<IPlayer>();
            ObserveState state = new ObserveState(player);
            
            Vector2D tacticalLocation = new Vector2D(50, 30);
            player.Stub(p => p.TacticalLocation).Return(tacticalLocation);
            player.Stub(p => p.DistanceTo(tacticalLocation)).Return(50);
            player.Expect(p => p.Run(Arg.Is(tacticalLocation), Arg<float>.Is.Anything));

            state.Execute();

            player.VerifyAllExpectations();
        }
    }
}
